package com.yu8home.mq.rabbit.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "yu8home.aaaa")
@Slf4j
public class RabbitService2 {

    @RabbitHandler
    public void a2(String message) throws InterruptedException {
        log.info("recevie：{}", message);
        Thread.sleep(1000);
    }

}
